home *** CD-ROM | disk | FTP | other *** search
/ Freelog 115 / FreelogNo115-MaiJuin2013.iso / Internet / Filezilla Server / FileZilla_Server-0_9_41.exe / source / interface / UsersView.cpp < prev    next >
C/C++ Source or Header  |  2011-11-06  |  3KB  |  111 lines

  1. // FileZilla Server - a Windows ftp server
  2.  
  3. // Copyright (C) 2002-2004 - Tim Kosse <tim.kosse@gmx.de>
  4.  
  5. // This program is free software; you can redistribute it and/or
  6. // modify it under the terms of the GNU General Public License
  7. // as published by the Free Software Foundation; either version 2
  8. // of the License, or (at your option) any later version.
  9.  
  10. // This program is distributed in the hope that it will be useful,
  11. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. // GNU General Public License for more details.
  14.  
  15. // You should have received a copy of the GNU General Public License
  16. // along with this program; if not, write to the Free Software
  17. // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  18.  
  19. // UsersView.cpp: Implementierungsdatei
  20. //
  21.  
  22. #include "stdafx.h"
  23. #include "filezilla server.h"
  24. #include "UsersView.h"
  25. #include "userslistctrl.h"
  26. #include "mainfrm.h"
  27.  
  28. #if defined(_DEBUG) && !defined(MMGR)
  29. #define new DEBUG_NEW
  30. #undef THIS_FILE
  31. static char THIS_FILE[] = __FILE__;
  32. #endif
  33.  
  34. /////////////////////////////////////////////////////////////////////////////
  35. // CUsersView
  36.  
  37. IMPLEMENT_DYNCREATE(CUsersView, CView)
  38.  
  39. CUsersView::CUsersView()
  40. {
  41.     m_pListCtrl = 0;
  42. }
  43.  
  44. CUsersView::~CUsersView()
  45. {
  46. }
  47.  
  48.  
  49. BEGIN_MESSAGE_MAP(CUsersView, CView)
  50.     //{{AFX_MSG_MAP(CUsersView)
  51.     ON_WM_SIZE()
  52.     ON_WM_CREATE()
  53.     ON_WM_DESTROY()
  54.     //}}AFX_MSG_MAP
  55. END_MESSAGE_MAP()
  56.  
  57. /////////////////////////////////////////////////////////////////////////////
  58. // Zeichnung CUsersView 
  59.  
  60. void CUsersView::OnDraw(CDC* pDC)
  61. {
  62.     // ZU ERLEDIGEN: Code zum Zeichnen hier einfⁿgen
  63. }
  64.  
  65. /////////////////////////////////////////////////////////////////////////////
  66. // Diagnose CUsersView
  67.  
  68. #ifdef _DEBUG
  69. void CUsersView::AssertValid() const
  70. {
  71.     CView::AssertValid();
  72. }
  73.  
  74. void CUsersView::Dump(CDumpContext& dc) const
  75. {
  76.     CView::Dump(dc);
  77. }
  78. #endif //_DEBUG
  79.  
  80. /////////////////////////////////////////////////////////////////////////////
  81. // Behandlungsroutinen fⁿr Nachrichten CUsersView 
  82.  
  83. void CUsersView::OnSize(UINT nType, int cx, int cy) 
  84. {
  85.     CView::OnSize(nType, cx, cy);
  86.         
  87.     m_pListCtrl->SetWindowPos( NULL, 0, 0, cx, cy, SWP_NOZORDER | SWP_NOMOVE );
  88. }
  89.  
  90. int CUsersView::OnCreate(LPCREATESTRUCT lpCreateStruct) 
  91. {
  92.     if (CView::OnCreate(lpCreateStruct) == -1)
  93.         return -1;
  94.     
  95.     CMainFrame *pMainFrame = (CMainFrame *)AfxGetMainWnd();
  96.     m_pListCtrl = new CUsersListCtrl(pMainFrame);
  97.     m_pListCtrl->Create(LVS_REPORT | WS_CHILD | WS_VISIBLE | LVS_SHOWSELALWAYS | LVS_OWNERDATA | LVS_SHAREIMAGELISTS | WS_VSCROLL, CRect(0,0,0,0), this, 0);
  98.     
  99.     return 0;
  100. }
  101.  
  102. void CUsersView::OnDestroy() 
  103. {
  104.     delete m_pListCtrl;
  105.     m_pListCtrl = 0;
  106.     CView::OnDestroy();
  107.     
  108.     // TODO: Code fⁿr die Behandlungsroutine fⁿr Nachrichten hier einfⁿgen
  109.     
  110. }
  111.